<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATES_PATH;?>/css/sale.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATES_PATH;?>/css/search_html5.css"/>		
<script src="<?php echo TEMPLATES_PATH;?>/js/screening.js"></script>
<link rel="stylesheet" href="<?php echo TEMPLATES_PATH;?>/css/university.css" />
<header class="layout head padding-small">
    <a href="javascript:back(true);" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">财富课程</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
<div class="main_content">
	<div class="layout padding">
        <div class="v-class bg-white text-center text-small clearfix radius-big ">
            <a href="index.php?act=university_index&op=u_list_rm_sort" class="x4 padding">热门</a>
            <a href="index.php?act=university_index&op=u_list_gl_sort" class="x4 padding">管理</a>
            <a href="index.php?act=university_index&op=u_list_yx_sort" class="x4 padding">营销</a>
            <a href="index.php?act=university_index&op=u_list_js_sort" class="x6 padding">技术</a>
            <a href="index.php?act=university_index&op=u_list_gw_sort" class="x6 padding">美财购物</a>
            <a href="index.php?act=university_index&op=u_list_cf_sort" class="x4 padding border-top curr">财富课程</a>
            <a href="index.php?act=university_index&op=u_list_zp_sort" class="x4 padding border-top">作品展示</a>
        </div>
    </div>
    <!--视频排序S-->
    	<div class="new-tab-type2" style="overflow: hidden; height: 34px; display: block; opacity: 10;">
        	<div class="new-tbl-type">
            	<a href="javascript:void(0)" onclick="changeOrder(this)" data-tp="default" class="new-tbl-cell w60"><span <?php if($_GET['key']=='default' || $_GET['key'] == ''){ echo 'class="on"';}?>>默认</span></a>
				<a href="javascript:void(0)" onclick="changeOrder(this)" data-tp="free" class="new-tbl-cell w60"><span <?php if($_GET['key']=='free'){ echo 'class="on"';}?>>免费</span></a>
				<a href="javascript:void(0)" onclick="changeOrder(this)" data-tp="study_price" class="new-tbl-cell w60"><span <?php if($_GET['key']=='study_price'){ echo 'class="on"';}?>>价格<?php echo ($_GET['order']=='desc' && $_GET['key']=='study_price')?'↑':(($_GET['order']=='asc' && $_GET['key']=='study_price')?'↓':'')?></span></a>
                <a href="javascript:void(0)" onclick="changeOrder(this)" data-tp="study" class="new-tbl-cell w60"><span <?php if($_GET['key']=='study'){ echo 'class="on"';}?>>学习<?php echo ($_GET['order']=='desc' && $_GET['key']=='study')?'↑':(($_GET['order']=='asc' && $_GET['key']=='study')?'↓':'')?></span></a>
				<a href="javascript:void(0)" onclick="changeOrder(this)" data-tp="collection" class="new-tbl-cell w60"><span <?php if($_GET['key']=='collection'){ echo 'class="on"';}?>>收藏<?php echo ($_GET['order']=='desc' && $_GET['key']=='collection')?'↑':(($_GET['order']=='asc' && $_GET['key']=='collection')?'↓':'')?></span></a>
		</div>
	</div>

    <!--视频排序E-->
    <div class="layout v-class-list">
    	<ul class="v-list clearfix">
    		      	<?php if(!empty($output['lesson_list']) && is_array($output['lesson_list'])){?>
        <?php foreach ($output['lesson_list'] as $_k => $_v) {?>
    	  <li class="x6 padding-small">
          	<a href="index.php?act=university_detail&op=index&study_id=<?php echo intval($_v['study_id'])?>" class=" padding-small radius-big bg-white ">
            	<div class="v-img">
                	<img src="<?php echo $_v['study_photo']?>" alt="" class="layout border-none layout">
                    <div class="v-play layout"></div>
                </div>
                <h3 class="text-small v-mane"><?php echo $_v['title']?></h3>
                <div class="height">
                	<span class="text-red"><?php if($_v['study_price']==0 && $_v['study_points']!=0){
                    		echo "积分".$_v['study_points'];
                    	}else if($_v['study_price']==0 && $_v['study_points']==0){
                    		echo "免费";
                    	} else{
                    		echo "￥".$_v['study_price'];
                    	}
                    	?></span><!-- 如需购买观看的，class类为text-red -->
                    <br>
                    <span class="text-red"><?php echo intval(universityModel::study_total($_v['study_id']))?></span>人在学习
                    |<span><?php echo intval(universityModel::study_collection($_v['study_id']))?></span>人收藏
                </div>
            </a>
          </li>
   
 <?php }}?>
 	<div class="new-search new-goods-lst">
    	
        <div class="new-search">
		
    
    <form id="condtion" method="get">
    	<input type="hidden" name="act" value="university_index" />
    	    	<input type="hidden" name="op" value="u_list_cf_sort" />
        <input name="type" value="<?php echo (int)$_GET['type']?>" type="hidden" />
        <input name="keyword" value="<?php echo trim($_GET['keyword'])?>" type="hidden" />
        <input name="cate_id" value="<?php echo (int)$_GET['cate_id']?>" type="hidden">
        <input name="a_id" id="a_id" value="<?php echo $_GET['a_id']?>" type="hidden">
        <input name="key" value="<?php echo $_GET['key'];?>" type="hidden" />
        <input name="order" value="<?php echo $_GET['order'];?>" type="hidden" />
    </form>
    
        
	</div>
</div>
   <?php require_once 'page.php';?>
		</ul>
    </div>
	<div class="v-footer">
    	<img src="<?php echo TEMPLATES_PATH;?>/images/footer.png" alt="" class="layout">
    </div>
</div>
<script type="text/javascript">
	$(function(){
		$('.v-play').height($('.v-img').height());
		$('#video-tab a').click(function(){
			$(this).addClass('text-red').find('i').toggleClass('icon-long-arrow-up');
			$(this).siblings().removeClass('text-red');
		});
	})
		function changeOrder(obj){
		var key = $('input[name=key]');
		var order = $('input[name=order]');
		if($(obj).data('tp') == key.val()){
			if($(obj).data('tp') == 'default'){
				order.val('');
			}else if(order.val() == 'desc'){
				order.val('asc');
			}else {
				order.val('desc');
			}
		}else{
			key.val($(obj).data('tp'));
			
			if($(obj).data('tp') == 'default'){
				order.val('');
			}else{
				order.val('desc');
			}
		}
		$('#condtion').submit();
	}
	
	
</script>
